package com.sirun.cn.fca.module.main.home.temp.control;

import com.sirun.cn.fca.module.main.home.temp.control.constant.ControlActionConst;
import com.sirun.cn.fca.module.main.home.temp.repo.ControlPollingResponse;
import com.sirun.cn.fca.module.main.home.temp.repo.ControlRequest;
import com.sirun.cn.fca.module.main.home.temp.repo.ControlResponse;
import com.tencent.cloud.iov.action.Action;
import com.tencent.cloud.iov.flow.presenter.IPresenter;
import com.tencent.cloud.iov.kernel.model.BaseResponse;


public interface ControlContract {
    interface View extends ControlActionConst.Normal {
        @Action(ACTION_INIT_DATA)
        void onInitData(String initInfo);

        @Action(ACTION_CONTROL_DOOR_RESULT)
        void onControlDoorResponse(BaseResponse<ControlResponse> response);

        @Action(ACTION_CONTROL_ENGINE_RESULT)
        void onControlEngineResponse(BaseResponse<ControlResponse> response);

        @Action(ACTION_CONTROL_BEER_RESULT)
        void onControlBeerResponse(BaseResponse<ControlResponse> response);

        @Action(ACTION_CONTROL_POLLING_RESULT)
        void onControlPollingRespons(BaseResponse<ControlPollingResponse> response);

        @Action(ACTION_CONTROL_CAR_RESULT)
        void onControlCarResponse(BaseResponse<ControlResponse> response);
    }

    interface Presenter extends IPresenter {

        /**
         * 控制车门
         */
        void controlDoor(String din, ControlRequest request);

        /**
         * 控制引擎
         */
        void controlEngine(String din, ControlRequest request);

        /**
         * 控制闪灯鸣笛
         */
        void controlBeer(String din, ControlRequest request);

        void controlCar(String type, String din, ControlRequest request);

        void controlPolling(String din, String platformResponseId);
    }
}
